<div class="layui-tab layui-tab-card">
    <div class="layui-tab-content">
        <form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="WarehouseLocation"style="height: 100%;">
            <div class="layui-card-body padding-left-40">

                <div class="layui-row layui-col-space20">

                    <div class="layui-col-md12">
                        <div class=" layui-block">
                            <samp style="color: red;">{:lang('货架名称格式为：区域编码 - 货架号 - 架位数 - 层数 如：A区 第6货架 第5层 第3格：A06-05-03')}</samp>
                            <samp style="color: red;"><br>{:lang('货架条码：按起始号叠加，为4位数')}</samp>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('仓库')}</label>
                        <div class="layui-input-block">
                            <select name="warehouse_id" lay-search required class="layui-select">
                                <option value=''>-- {:lang('请选择')} --</option>
                                {foreach $warehouse as $id => $title}
                                <option value="{$id}" {if isset($vo.warehouse_id) && $vo.warehouse_id == $id} selected {/if} >{$title}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md6"><div style="height: 38px;"></div></div>

                    <div class="layui-col-md6" style="display: flex;">
                        <label class="layui-form-label">{:lang('区域名称')}</label>
                        <div class="layui-input-block" style="width: 50%;margin-left: 0;">
                            <input name="region_name" value='{$vo.region_name|default=""}' class="layui-input" placeholder="{:lang('区域名称')}" required>
                        </div>
                        <p style="flex-shrink: 0;line-height: 38px;margin-left: auto;color: red;">{:lang('如：衣服区,电子区')}</p>
                    </div>

                    <div class="layui-col-md6" style="display: flex;">
                        <label class="layui-form-label">{:lang('区域编码')}</label>
                        <div class="layui-input-block"  style="width: 50%;margin-left: 0;">
                            <input name="region_code" value='{$vo.region_code|default=""}' class="layui-input" placeholder="{:lang('区域编码')}" required>
                        </div>
                        <p style="flex-shrink: 0;line-height: 38px;margin-left: auto;color: red;">{:lang('如：A B C')}</p>
                    </div>

                    <div class="layui-col-md6" style="display: flex;">
                        <label class="layui-form-label">{:lang('货位连接符')}</label>
                        <div class="layui-input-block"  style="width: 50%;margin-left: 0;"><select name="connector" lay-search required class="layui-select">
                                <option value=''>-- {:lang('请选择')} --</option>
                                {foreach ['-' => '-', '/' => '/', '&' => '&'] as $v => $title}
                                <option value="{$v}" {if isset($vo.connector) && $vo.connector == $v} selected {/if} >{$title}</option>
                                {/foreach}
                            </select>
                        </div>
                        <p style="flex-shrink: 0;line-height: 38px;margin-left: auto;color: red;">{:lang('如：A1-1-1、A1/1/1、A1&1&1')}</p>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('货架数量')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="shelves_num" value='{$vo.shelves_num|default=""}' class="layui-input" placeholder="{:lang('货架数量')}" required>
                        </div>
                    </div>
                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('货架起始数')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="shelves_origin_num" value='{$vo.shelves_origin_num|default=1}' class="layui-input" placeholder="{:lang('货架起始数')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('层数')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="layers_num" value='{$vo.layers_num|default="1"}' class="layui-input" placeholder="{:lang('层数默认1')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('层数起始数')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="layers_origin_num" value='{$vo.layers_origin_num|default=1}' class="layui-input" placeholder="{:lang('层数起始数')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('格数')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="lattice_num" value='{$vo.lattice_num|default=1}' class="layui-input" placeholder="{:lang('格数默认1')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('格数起始数')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="lattice_origin_num" value='{$vo.lattice_origin_num|default=1}' class="layui-input" placeholder="{:lang('格数起始数')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('库存容量m³')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="inventory_capacity" value='{$vo.inventory_capacity|default=""}' class="layui-input" placeholder="{:lang('库存容量')}" required>
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('排序')}</label>
                        <div class="layui-input-block">
                            <input type="number" name="sort" value='{$vo.sort|default=0}' class="layui-input" placeholder="{:lang('排序')}">
                        </div>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('货架类型')}</label>
                        <div class="layui-input-block">
                            <select name="shelves_type" lay-search required class="layui-select">
                                {foreach $shelves_type as $key=>$val}
                                <option {if !empty($vo.shelves_type) && $key eq $vo.shelves_type }selected{/if} value="{$key|default=''}">{$val|default=''}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-col-md6" style="display: flex;">
                        <label class="layui-form-label">{:lang('层级显示')}</label>
                        <div class="layui-input-block" style="width: 50%;margin-left: 0;">
                            <select name="show_tier" lay-search required class="layui-select">
                                {foreach $show_tier as $key=>$val}
                                <option {if !empty($vo.show_tier) && $key eq $vo.show_tier }selected{/if} value="{$key|default=''}">{$val|default=''}</option>
                                {/foreach}
                            </select>
                        </div>
                        <p style="flex-shrink: 0;line-height: 38px;margin-left: auto;color: red;">{:lang('是否展示货架层数，不显示一般用于地面摊位')}</p>
                    </div>

                    <div class="layui-col-md6">
                        <label class="layui-form-label">{:lang('状态')}</label>
                        <div class="layui-input-block">
                            <select name="status" lay-search required class="layui-select">
                                {foreach $status as $key=>$val}
                                <option {if !empty($vo.status) && $key eq $vo.status }selected{/if} value="{$key|default=''}">{$val|default=''}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                </div>

            </div>

            <div class="hr-line-dashed"></div>
            {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
            <div class="layui-form-item text-center">
                <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
                {if !empty($vo.id)}<button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗？')}" data-iframe-close>{:lang('取消编辑')}</button>{/if}
            </div>
        </form>
    </div>
</div>